//当前这个模块：api进行统一管理
import requests from "./request";
import mockRequest from './mockAjax'
//三级联动接口
///api/product/getBaseCategoryList get 无参数
//发请求
export const reqCategoryList = () => requests({ url: '/product/getBaseCategoryList', method: 'get' });
//获取banner(Home首页轮播图接口)
export const reqGetBannerList = () => mockRequest.get('/banner');
//获取floor
export const reqFloorList = () => mockRequest.get('/floor');
//搜索页面
export const reqGetSearchInfo = (params) => requests({ url: "/list", method: "post", data: params })
    //获取商品详情信息
export const reqGoodsInfo = (skuId) => requests({ url: `/item/${skuId}`, method: 'get' });
//将产品添加到购物车中
export const reqAddOrupdateShopCart = (skuId, skuNum) => requests({ url: `/cart/addToCart/${skuId}/${skuNum}`, method: 'post' });
//购物车详情
export const reqCartList = () => requests({ url: '/cart/cartList', method: 'get' })
    //获取验证码
export const reqGetCode = (phone) => requests({ url: `/user/passport/sendCode/${phone}`, method: 'get' })
    //注册
export const reqUserRegister = (data) => requests({ url: '/user/passport/register', data, method: 'post' })